﻿<?php 

include_once 'classes/Modelo.class.php';
include_once 'classes/Roda.class.php';
include_once 'classes/Cor.class.php';
include_once 'classes/Freio.class.php';
include_once 'classes/Motor.class.php';
include_once 'classes/Chassi.class.php';
include_once 'classes/Automovel.class.php';
include_once 'classes/Componentes.class.php';


if(isset($_POST['MODELO'])){
	$modelo=$_POST['MODELO'];
}else{
	$modelo='';
}

if(isset($_POST['MARCA'])){
	$marca=$_POST['MARCA'];
}else{
	$marca='';
}


if(isset($_POST['RODA'])){
	$roda=$_POST['RODA'];
}else{
	$roda='';
}

if(isset($_POST['COR_RODA'])){
	$cor_roda=$_POST['COR_RODA'];
}else{
	$cor_roda='';
}

if(isset($_POST['ARO'])){
	$aro=$_POST['ARO'];
}else{
	$aro='';
}

if(isset($_POST['FREIO'])){
	$freio=$_POST['FREIO'];
}else{
	$freio='';
}

if(isset($_POST['MOTOR'])){
	$motor = $_POST['MOTOR'];
}else{
	$motor='';
}

if(isset($_POST['POTENCIA'])){
	$potencia = $_POST['POTENCIA'];
}else{
	$potencia='';
}

if(isset($_POST['COR_CHASSI'])){
	$cor_chassi=$_POST['COR_CHASSI'];
}else{
	$cor_chassi='';
}



//

$ObjectModelo = new Modelo($modelo,$marca);

$ObjectCorRoda = new Cor($cor_roda);

$ObjectRoda = new Roda($roda,$aro,$ObjectCorRoda);


$ObjectFreio = new Freio($freio);

$ObjectMotor = new Motor($motor, $potencia);

$ObjectCorChassi = new Cor($cor_roda);

$ObjectChassi = new Chassi($ObjectCorChassi);


$ObjectComponentes = new Componentes($ObjectRoda, $ObjectFreio, $ObjectChassi, $ObjectMotor);

$ObjectAutomovel = new Automovel($ObjectModelo, $ObjectComponentes);

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>AUTOMOVEL</title>
<link href="css/estilo.css" rel="stylesheet" type="text/css" media="screen" />
<script language="JavaScript" src="jquery/jquery.js" type="text/javascript"></script>
<script language="JavaScript" src="jquery/jogo.js" type="text/javascript"></script>
</head>
<body id="back">
<form id="automovel" name="automovel">
  <input type="hidden" id="cor" name="cor" value="<?php echo "$cor_chassi";?>"/>
	</form>
	<img src="images/carro_Black.png" width="60" height="100" id="carro"  />
    
    <div id="soundContainer"> </div>
</body>
</html>
